import {mc_validatorResult} from "../model/mc_validatorResult";
import {abstractValidator} from "./abstractValidator";
/**
 * Created by ybjaa on 2017/6/28.
 */
export class requireValidator extends abstractValidator{



    protected getValidator(value: number | string | Object): mc_validatorResult {
        if(value==null||value==undefined){
            this.setResult(false,"数据为空");
        }
        return this.result;
    }


    public validator(value: number | string | Object):mc_validatorResult{

        //判断是否为空
        this.result=new mc_validatorResult();
        return this.getValidator(value);

    }
}